4D Chart v13

CT SAVE DOCUMENT

Home

 
4D Chart v13
CT SAVE DOCUMENT

CT SAVE DOCUMENT 


 

CT SAVE DOCUMENT ( area ; document ; type ; scope ) 
Parameter Type   Description
area  Longint in 4D Chart area
document  Text in Name of document, with path
type  String in Type of document
scope  Longint in Scope of the command 0 = All objects 1 = Selected objects

The CT SAVE DOCUMENT command saves the contents of area in document.

If document is an empty string, CT SAVE DOCUMENT displays the standard save-file dialog box, enabling the user to specify the document name, type, and scope. If document is not an empty string, CT SAVE DOCUMENT saves document with the type type.

If document does not exist, CT SAVE DOCUMENT creates it. If document exists, CT SAVE DOCUMENT overwrites it.

If type is an empty string, a standard 4D Chart document is created. To save the document as a PICT, type should be "PICT".

The optional scope parameter controls what is saved in document. Use scope only when document is not an empty string and when saving a document as a PICT.

By default, document is saved in the directory that contains the database structure. If you want to save a document outside of this directory, specify a complete pathname. See the 4D Language Reference manual for a brief description of pathnames.

Example  

This example saves a 4D Chart document in a document with the same name as the company, followed by the year.

  `Request the year number
 $Year :=Request("For what year?")
  `If the request is validated
 If(OK=1)
  `Concatenate the document name
    $SaveName :=[Company]Name+" "+$Year
  `Save the document
    CT SAVE DOCUMENT(Area;$SaveName;"")
 End if

 
PROPERTIES 

Product: 4D Chart
Theme: CT Area
Number: 14502

 
INDEX

Alphabetical list of commands

 
HISTORY 

Created: 4D Chart 1

 
SEE ALSO 

CT OPEN DOCUMENT